package com.nwnu.springboot;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {

//    //获取.yml文件中的值
//    @Value("${name}")
//    private String name;
//    @Value("${csdnUrl}")
//    private String csdnUrl;


    @Autowired
    private Author author;
    @RequestMapping("/hello")
    public String hello(){
        return "name:"+author.getName()+"个人博客"+author.getCsdnUrl();
    }
}
